﻿@{
    Layout = null;
}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="format-detection" content="telephone=no">
    <meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
    <link href="~/Content/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
    <link href="~/Content/bootstrap/css/base.css" rel="stylesheet" />
    <script src="~/Scripts/jquery-2.1.1.min.js"></script>
    <script src="~/Content/bootstrap/js/bootstrap.js"></script>
    <script src="~/Scripts/layer/layer.js"></script>
    <link href="~/Scripts/Date/css/mobiscroll.css" rel="stylesheet" />
    <link href="~/Scripts/Date/css/mobiscroll_date.css" rel="stylesheet" />
    <script src="~/Scripts/Date/js/mobiscroll_date.js" charset="gb2312"></script>
    <script src="~/Scripts/Date/js/mobiscroll.js"></script>
    <title>授权更新</title>
    <style type="text/css">
        body {
            font-family: arial, '宋体';
        }

        .container-fluid {
            margin: 0;
            padding: 0;
            text-align: center;
        }

        .btn_ok {
            background-color: #F3A433;
            border: none;
            color: white;
        }

        #update_pass {
            background-color: #F3A433;
            text-align: center;
            font-weight: bold;
            font-size: 20px;
            width: 100%;
            height: 60px;
            line-height: 60px;
        }

        #txt_password {
            margin-top: 15%;
        }

        .container-fluid {
            margin: 0;
            padding: 0;
        }
    </style>
    <script>
        $(function () {

            var date = new Date();
            var opt = {};
            var currYear = date.getFullYear();
            var currMonth = date.getMonth();
            var currDay = date.getDate();
            var maxdate = new Date();
            maxdate.setDate(date.getFullYear() + 5);
            opt.date = { preset: 'date', minDate: new Date(currYear, currMonth, currDay), maxDate: maxdate };
            opt.datetime = { preset: 'datetime' };
            opt.time = { preset: 'time' };
            opt.default = {
                theme: 'android-ics light', //皮肤样式
                display: 'modal', //显示方式
                mode: 'scroller', //日期选择模式
                dateFormat: 'yyyy-mm-dd',
                lang: 'zh',
                showNow: true,
                nowText: "今天",
                startYear: currYear, //开始年份
                endYear: currYear //结束年份
            };

            $("#start_time").mobiscroll($.extend(opt['date'], opt['default']));
            $("#btn_ok").click(function () {
                var start_times = $("#start_time").val();
                $.ajax({
                    type: "POST",
                    url: "/Sqauthorization/Add_Sqauthorization",
                    data: {"start_time": start_times},
                    dataType: "json",
                    async: false,
                    success: function (data) {
                        //alert(JSON.stringify(data));
                        if (data == true) {
                            layer.msg("申请成功，请等待审核!");
                            setTimeout(function () {
                                location.href = "/Home/Index";
                            }, 2000)
                        } else {
                            layer.alert("申请失败,请稍后再试！");
                        }
                    }
                });
            })
        })

    </script>
</head>
<body>
    <div class="container-fluid">
        <div class="row-fluid">
            <div class="span12" id="update_pass">
                <span style="text-align:center;color:white;">授权时间更新申请</span>
            </div>
        </div>
    </div>
    @{
        if (@ViewData["mes"] == "0")
        { 
              <div class="container-fluid">
        <div class="row-fluid">
            <div class="span12" style="text-align:left;">
                <div style="line-height:64px;height:64px; width:100%;"> <span>授权时间(始):</span><input type="text" class="txt" id="start_time" name="start_time" placeholder="开始时间" readonly="readonly"></div>
            </div>
        </div>
      </div>
     <div class="container-fluid">
        <div class="row-fluid">
            <input type="button" id="btn_ok" class="ShareApp" value="确定" style="border: 0; background-color: #F3A433; width: 50%; height: 40px; " />
        </div>
      </div>
        
        }
        else if (@ViewData["mes"] == "1")
        { 
         <h1>您还未被授权,不能申请授权!</h1>
        }
        else { 
         <h2>您的授权还未过期,离过期时间还有:<span style="color:red;">@ViewData["ady"]</span>天</h2>
        
        }
        
        
    }
  
    <div id="sharePic" class="sharePic" style="display:none;">
        <img src="~/Content/images/share.png" />
    </div>
    <div class="serp_quick_but">
        <a id="ab" class="quick_menu"></a>
        <a href="../Home/Index" id="a1" class="quick_menu_back small"><span>首页</span></a>
        <a href="../Certificate/Index" id="a2" class="quick_menu_fahuo small"><span>证书</span></a>
        <a href="../Examine/Index" id="a4" class="quick_menu_clienk small"><span>用户</span></a>
        <a href="../WechartShare/Index" id="a4" class="quick_menu_clienk small"><span>邀请</span></a>
        <a href="../Sqauthorization/Index" id="a3" class="quick_menu_shaom small"><span>申请</span></a>
        <a href="../Password/Index" id="a4" class="quick_menu_clienk small"><span>密码</span></a>
        <a href="../Login/ClearSession" id="a5" class="quick_menu_follow small"><span>退出</span></a>
    </div>
    <style type="text/css">
        .sharePic {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            z-index: 2000;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.5);
            text-align: right;
        }

            .sharePic.on {
                display: block;
            }

            .sharePic img {
                margin-top: 10px;
                margin-right: 30px;
                width: 160px;
            }

        .serp_quick_but {
            position: fixed;
            width: 300px;
            height: 60px;
            bottom: 0px;
            right: 5px;
        }

            .serp_quick_but a {
                display: block;
                position: absolute;
                text-align: center;
                text-decoration: none;
            }

                .serp_quick_but a span {
                    font-size: 12px;
                    line-height: 94px;
                    color: #000;
                }

        a.small {
            width: 36px;
            height: 36px;
            background: #d5d5d5;
            border-radius: 30px;
            border: 2px solid #fff;
            background: url(../Content/images/pic02.png) no-repeat rgba(0,0,0,0.4);
            background-size: auto 70px;
        }

        a:hover.small {
            border: 2px solid #fc4e2b;
            background: #fff;
        }

        .serp_quick_but a.quick_menu {
            right: 5px;
            top: -5px;
            width: 40px;
            height: 40px;
            background: url(../Content/images/pic02.png) no-repeat;
            background-size: auto 40px;
        }

        .serp_quick_but a.quick_menu_back {
            right: 55px;
            top: -5px;
            background-position: -69px -18px;
            display: none;
        }

        .serp_quick_but a.quick_menu_fahuo {
            right: 105px;
            top: -5px;
            background-position: -100px -18px;
            display: none;
        }

        .serp_quick_but a.quick_menu_shaom {
            right: 155px;
            top: -5px;
            background-position: -137px -18px;
            display: none;
        }

        .serp_quick_but a.quick_menu_clienk {
            right: 205px;
            top: -5px;
            background-position: -169px -18px;
            display: none;
        }

        .serp_quick_but a.quick_menu_follow {
            right: 255px;
            top: -5px;
            background-position: -209px -18px;
            display: none;
        }
    </style>
    <script>
        //左下方导航
        $(function () {
            var i = 0;
            $("#ab").click(function () {
                i++;
                if (i % 2 == 0) {
                    $("#a1").hide();
                    $("#a2").hide();
                    $("#a3").hide();
                    $("#a4").hide();
                    $("#a5").hide();
                }
                else {
                    $("#a1").show();
                    $("#a2").show();
                    $("#a3").show();
                    $("#a4").show();
                    $("#a5").show();
                }
            })
        })
    </script>
</body>
</html>

